<template>
    <el-config-provider :size="settingsStore.elementSize">
        <component :is="componentName" v-bind="stateData"></component>
    </el-config-provider>
</template>

<script setup name="ComponentMicroApp">
/*
 * File Created: 2022-07-18 10:12:48
 * Author: yubaolin (yubaolin6@outlook.com)
 * Desc: 子应用组件方式渲染时的根组件
 * Last Modified: 2022-07-18 10:13:08
 * Modified By: yubaolin (yubaolin6@outlook.com>)
 */

import {useSettingsStore} from '@/store/modules/settings'

const props = defineProps({
    componentName: {
        type: String,
        default: ''
    },
    stateData: {
        type: Object,
        default: () => null
    }
})

const settingsStore = useSettingsStore()
</script>
